<template>
	<div class="list" ref="wrapper">
		<div>
			<div class="area">
				<div class="area-title">
					当前城市
				</div>
				<div class="button-list clearfix">
					<div class="button-box clearfix">
						<div class="button">北京</div>
					</div>
				</div>
			</div>
			<div class="area">
				<div class="area-title">
					热门城市
				</div>
				<div class="button-list clearfix">
					<div class="button-box clearfix" v-for="item of hot" :key="item.id">
						<div class="button">{{item.name}}</div>
					</div>
				</div>
			</div>
			<div class="area" v-for="(item,key) of cities" :key="key">
				<div class="area-title">
					{{key}}
				</div>
				<div class="item-list">
					<div class="item" v-for="innerItem of item" :key="innerItem.id">
						{{innerItem.name}}
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	import Bscroll from 'better-scroll'
	export default {
		mounted () {
			this.scroll =new Bscroll(this.$refs.wrapper)
		},
		props:{
			hot:Array,
			cities:Object
		}
	}
</script>

<style lang="css" scoped>
	html,body{
		overflow-y: auto;
	}
	.list{
		position: absolute;
		top: 1.46rem;
		left: 0;
		right: 0;
		bottom: 0;
		overflow: hidden;
	}
	.area-title{
		height: .5rem;
		line-height: .5rem;
		background: #eee;
		color: #666;
		padding-left: .15rem;	
	}
	.button-list{
		padding: .15rem;
		padding: .03rem .3rem .05rem .05rem;
	}
	.button-box{
		width: 33.33%;
		float: left;
		
	}
	.button{
		margin: .1rem .1rem;
		text-align: center;
		border: .02rem solid #ccc;
		padding: .15rem 0;
		border-radius: .06rem;
	}
	.item{
		height: .6rem;
		line-height: .6rem;
		color: #666;
		padding-left: .15rem;
		border-bottom: 0.01rem solid #ccc;
		font-size: 0.14rem;
	}
</style>